package com.jzd1997.lesson2;

import org.apache.commons.lang.math.NumberUtils;

public class CashRebate extends CashSuper {
    private double moneyRebate = 1d;
    public CashRebate(String moneyRebate){
        this.moneyRebate = NumberUtils.toDouble(moneyRebate);
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }

}
